#include<stdio.h>
int fun(int x){
   int count=0;
   while(x%10){
       x/=10;
       count++;
   }
   return count;
}
int main(){
   printf("%d",fun(1234));
   return 0;
}
#include<stdio.h>
int fun(int x){
   int count=1;
   while(x%10){
       x/=10;
       count++;
   }
   return count;
}
int main(){
   printf("%d",fun(123));
   return 0;
}
